package cn.weekdragon.gscore.adapter.predicate.impl;

import cn.weekdragon.gscore.adapter.model.EventExt;
import cn.weekdragon.gscore.adapter.predicate.BotPredicate;

public class PrefixPredicate implements BotPredicate {

    private final String prefix;

    public PrefixPredicate(String prefix){
        this.prefix = prefix;
    }

    @Override
    public boolean test(EventExt eventExt) {
        return eventExt.argsText().startsWith(prefix);
    }
}
